FROM mysql:5.7
MAINTAINER mr.wang "wangjunlei0520@foxmail.com"
ENV WORK_PATH /usr/local/work
ENV AUTO_RUN_DIR /docker-entrypoint-initdb.d
 
ENV FILE_0  init.sql
ENV INSTALL_DATA_SHELL install_data.sh
 
RUN mkdir -p $WORK_PATH
COPY utf8mb4.cnf /etc/mysql/conf.d/utf8mb4.cnf
COPY ./$FILE_0 $WORK_PATH/
COPY ./$INSTALL_DATA_SHELL $AUTO_RUN_DIR/
EXPOSE 3306
RUN chmod a+x $AUTO_RUN_DIR/$INSTALL_DATA_SHELL
